package com.medusa.aps.business.modules.basic.mp.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.medusa.aps.business.model.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 物料单位实体类
 *
 * @author yuxh
 * @since 2024-02-03 16:20:25
 */
@Data
@Accessors(chain = true)
@TableName(autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class MaterialUnit extends BaseEntity<MaterialUnit> {
    /**
     * 主键
     */
    @Schema(description = "主键")
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 生产单位
     */
    @Alias("生产单位")
    @Schema(description = "生产单位")
    private String productUnit;
    /**
     * 采购单位
     */
    @Alias("采购单位")
    @Schema(description = "采购单位")
    private String purchaseUnit;
    /**
     * 生产单位:采购单位
     */
    @Alias("生产单位:采购单位")
    @Schema(description = "生产单位:采购单位")
    private String productPurchaseUnitRatio;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

